home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMWIN1.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  2KB  |  68 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMWIN1.PAS
  12.               Illustrates basic window management
  13. }
  14.  
  15. program DemWin1;
  16.  
  17. {$I GOLDFLAG.INC}
  18.  
  19. uses DOS,CRT, GoldAttr, GoldFast, GoldWin, GoldKey, GoldMisc, GoldStr;
  20.  
  21. var
  22.   WinHandle: integer;
  23.  
  24. procedure SetScreen;
  25. {}
  26. begin
  27.    clrscr;
  28.    SetBlinking(false);
  29.    Clear(WhiteOnBlue,chr(177));
  30.    ClearLine(1,YellowOnBlue);
  31.    WriteCenter(1,UseTint,'TTT Gold!');
  32.    ClearLine(25,YellowOnRed);
  33.    WriteCenter(25,UseTint,'Press Esc to finish or click on [■].');
  34. end; { SetScreen }
  35.  
  36. begin
  37. {$IFOPT D+}
  38.    HeapRecord;
  39. {$ENDIF}
  40.    SetScreen;
  41.    WinHandle := WinCreate(5,5,75,20,1);
  42.    WinSetType(WinHandle,WMove);
  43.    WinSetTitle(WinHandle,' My First Window ');
  44.    WinSetScrollType(WinHandle,BothScroll);
  45.    WinDisplay(WinHandle);
  46.    (*
  47.    LineWrap := true;   {tells Gold to automatically wrap text to next line}
  48.    SetWinIgnore(true); {Tells Gold to ignore the local window coordinates}
  49.    ShadowAttr := 11;   {controls the shadow color -- accepts any byte value}
  50.    ShadowType := 1;    {accepts values 0 to 3, controls shadow position}
  51.    *)
  52.    WritePlain(1,1,'This is a very long string which should wrap to the next line if LineWrap is true');
  53.    WinDrawAll;
  54.    MouseShow(true);
  55.    {now process keystrokes}
  56.    with KeyVars do
  57.       repeat
  58.          GetInput;
  59.          if IsWinKey(LastKey,LastX,LastY) then
  60.             WinProcessKey(LastKey,LastX,LastY);
  61.       until (LastKey = 27) or (LastKey = 600);
  62.    MouseShow(false);
  63.    WinDispose(WinHandle);
  64. {$IFOPT D+}
  65.    HeapCheck;
  66. {$ENDIF}
  67. end.
  68.